﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LogicUniversityBiz;


namespace LogicUniversity.Representative
{
    public partial class UpdateCollectionPoint : System.Web.UI.Page
    {

        CoreHeadFascade fascade = new CoreHeadFascade();

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lblmsg.Text = "";
                ddlcollectionpoint.DataSource = fascade.selectcollectionpoint();
                ddlcollectionpoint.DataTextField = "Collection_Point";
                ddlcollectionpoint.DataValueField = "Collection_Point";
                ddlcollectionpoint.DataBind();
            }

        }

        protected void btnsave_Click(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                fascade.savecollectionpoint("ENG", ddlcollectionpoint.SelectedValue.ToString());

                lblmsg.Text = "Save Collection Point Successfully";
            }

        }

        protected void ddlcollectionpoint_TextChanged(object sender, EventArgs e)
        {
            //fascade.savecollectionpoint("ENG", ddlcollectionpoint.SelectedValue);

            //lblmsg.Text = "Save Collection Point Successfully";
        }
    }
}